package com.ouc.openplatform.zykt.orderManage.service.impl;

import java.util.List;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ouc.openplatform.pojo.EUDataGridResult;
import com.ouc.openplatform.zykt.orderManage.dao.DD_Order_DetailDao;
import com.ouc.openplatform.zykt.orderManage.model.DD_Order_Detail;
import com.ouc.openplatform.zykt.orderManage.service.DD_Order_DetailService;

public class DD_Order_DetailServiceImpl implements DD_Order_DetailService{

	private DD_Order_DetailDao orderDetailDao;
	
	public DD_Order_DetailDao getOrderDetailDao() {
		return orderDetailDao;
	}

	public void setOrderDetailDao(DD_Order_DetailDao orderDetailDao) {
		this.orderDetailDao = orderDetailDao;
	}

	//根据订单号和产品条码查询订单详情-----sxl
	@Override
	public EUDataGridResult findOrderDetailByCode(String orderNo, String barCode, int page, int rows) {
		//分页处理
		PageHelper.startPage(page, rows);
		List<DD_Order_Detail> orderDetailList = orderDetailDao.findOrderDetailByCode(orderNo, barCode);
		//创建一个返回值对象
		EUDataGridResult result = new EUDataGridResult();
		result.setRows(orderDetailList);
		//取记录总条数
		PageInfo<DD_Order_Detail> pageInfo = new PageInfo<DD_Order_Detail>(orderDetailList);
		result.setTotal(pageInfo.getTotal());
		return result;
	}

	
	
	
	
}
